<div id="actionbar" class="fn-clear">
    <div class="fn-left">
        <button class="button bar" url="{:url('user/selectworkerstore',['worker_id' => $worker_id])}" msg="您确认要关联已选商家吗？"><i class="iconfont icon-lianjie"></i>确认关联商家</button> 
    </div>
    <div class="fn-right">
        <form id="form" action="{:url('user/selectworkerstore')}" method="get">
            <input type="hidden" name="worker_id" value="{$worker_id}" />
            <input placeholder="请输入好店名称" class="input w200 ext-select" type="text" name="keyword" value="{$keyword}" />
            <input type="submit" value="搜索" class="button button-blue" />
        </form>
    </div>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w40 fn-tac"><input type="checkbox" onclick="CheckAll(this)"></th>
            <th class="w60 fn-tac"></th>
            <th>好店名称</th>
            <th class="w140">联系电话</th>
            <th class="w140">更新时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><input name="ids[]" type="checkbox" value="{$vo.id}"></td>
            <td class="fn-tac"><img src="{$vo.img}?x-oss-process=style/80" class="w40" /></td>
            <td>
                <i class="iconfont icon-home_icon"></i>
                <a href="{:url('store/review',['id'=>$vo.id])}">{$vo.name}</a>
                {if $vo.is_top}<span class="badge bg-green">置顶</span>{else}<span class="badge">置顶</span>{/if}
                {if $vo.is_default}<span class="badge bg-blue">默认</span>{else}<span class="badge">默认</span>{/if}
                {if $vo.is_lock}<span class="badge bg-red">锁定</span>{else}<span class="badge">锁定</span>{/if}<br />
                <i class="iconfont icon-address_icon"></i><span class="gray">{$vo.address}</span>
            </td>
            <td>{$vo.telphone}</td>
            <td>{$vo.create_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
Do('base','layer',function(){
    $(".bar").click(function() {
        var url = $(this).attr('url');
        var msg = $(this).attr('msg');
        tools_submit({action:url,msg:msg})
    })
})
</script>